<header>
    <div class="title">
        <a href="">Clases</a><span> > </span><strong>Registrar nueva clase personalizada</strong>
    </div>
    <div class="shortcuts">
        <a href=""></a>
    </div>
    <div class="help">
        <a href="">Ayuda</a>
    </div>
</header>
<div class="sidebar">
    <div id="lesson-create" class="content">
        <h3>Nueva clase personalizada</h3>
        <?php if (!empty($validacion)) { ?>
        <div class="alert alert-error">
            <span class="icon block"></span>
            <strong>Se han encontrado errores:</strong>
            <ul>
                <?php foreach ($validacion as $item_fail) { ?>
                    <li><label for="lesson-create-form-<?php echo $item_fail['item']; ?>"><?php echo $item_fail['message']; ?></label></li>
                <?php } ?>
            </ul>
        </div>
        <?php } ?>
        <form id="lesson-create-form" action="#" method="post" enctype="multipart/form-data">
            <input name="form-action" type="hidden" value="create-lesson" />
            <div class="form-fields">
                <label>
                    <span class="name">Nombre:</span>
                    <input type="text" id="lesson-create-form-nombre" name="nombre" value="<?php if ($lesson->get('clases','nombre')) echo html_entity_decode($lesson->get('lessones','nombre')); ?>" placeholder="Ingrese el nombre aqui" />
                    <span class="help" data-text="Depending on project settings weekend may be included in due date calculation"></span>
                </label>
                <label>
                    <span class="name">Descripcion:</span>
                    <textarea id="lesson-create-form-descripcion" name='descripcion'><?php if ($lesson->get('clases','descripcion')) echo html_entity_decode($lesson->get('lessones','descripcion')); ?></textarea>
                    <span class="help" data-text="Depending on project settings weekend may be included in due date calculation"></span>
                </label>
                <label class="lessson-specific-schedule">
                    <span class="name">Horario:</span>
                    <input type="text" name="date" value="" placeholder="mm/dd/aaaa" />
                    &nbsp;-
                    <select name="hour">
                        <option disabled selected>Hora</option>
                        <option value="0">00</option>
                        <option value="1">01</option>
                        <option value="2">02</option>
                        <option value="3">03</option>
                        <option value="4">04</option>
                        <option value="5">05</option>
                        <option value="6">06</option>
                        <option value="7">07</option>
                        <option value="8">08</option>
                        <option value="9">09</option>
                        <option value="10">10</option>
                        <option value="11">11</option>
                        <option value="12">12</option>
                        <option value="13">13</option>
                        <option value="14">14</option>
                        <option value="15">15</option>
                        <option value="16">16</option>
                        <option value="17">17</option>
                        <option value="18">18</option>
                        <option value="19">19</option>
                        <option value="20">20</option>
                        <option value="21">21</option>
                        <option value="22">22</option>
                        <option value="23">23</option>
                    </select>
                    &nbsp;:
                    <select name="minutes">
                        <option disabled selected>Minuto</option>
                        <option value="0">00</option>
                        <option value="5">05</option>
                        <option value="10">10</option>
                        <option value="15">15</option>
                        <option value="20">20</option>
                        <option value="25">25</option>
                        <option value="30">30</option>
                        <option value="35">35</option>
                        <option value="40">40</option>
                        <option value="45">45</option>
                        <option value="50">50</option>
                        <option value="55">55</option>
                    </select>
                    hs
                </label>
                <!--<div class="double">
                    <label>
                        <span class="name">Fecha:</span>
                        <input type="text" id="lesson-create-form-fecha" name="fecha" value="<?php if ($lesson->get('clases','zxc')) echo html_entity_decode($lesson->get('lessones','zxc')); ?>" placeholder="Ingrese la fecha aqui" />
                        <span class="help" data-text="Depending on project settings weekend may be included in due date calculation"></span>
                    </label>
                    <label>
                        <span class="name">Horario:</span>
                        <input type="text" id="lesson-create-form-horario" name="horario" value="<?php if ($lesson->get('clases','asd')) echo html_entity_decode($lesson->get('lessones','asd')); ?>" placeholder="Ingrese el horario aqui" />
                        <span class="help" data-text="Depending on project settings weekend may be included in due date calculation"></span>
                    </label>
                </div>-->
            </div>
            <?php if (count($arr_students)>0) { ?>
            <div class="groups-students-selector clearfix" id="students-selector">
                <div class="form-container all-students">
                    <strong class="title">Listado de todos los alumnos</strong>
                    <div class="content">
                        <div class="search">
                            <span class="icon search"></span>
                            <input value="" type="text" placeholder="Buscar..." />
                            <button class="clear"><span class="icon circled-cross"></span><span class="text">Borrar</span></button>
                        </div>
                        <div class="filters hidden">
                            <strong>Filtrar por:</strong>
                            <button class="button" data-filter="2">Regulares</button>
                            <button class="button" data-filter="3">No regulares</button>
                            <button class="button" data-filter="4">Potencial</button>
                        </div>
                        <div class="form-fields">
                            <div class="no-students-msg">
                                <span>No se encuentran alumnos</span>
                            </div>
                            <?php foreach ($arr_students as $student) { ?>
                            <label class="no-quote">
                                <input type="checkbox" value="<?php echo $student['id'];?>" <?php if (@in_array((string)$student['id'],$_POST['students'])) echo 'checked'; ?> />
                                <img src="<?php echo $host; ?>/test/content/test-student-32x32.jpg" class="size-32x32" />
                                <span class="text"><?php echo $student['nombre']. ' ' .$student['apellido']; ?> (<?php echo $student['email']; ?>)</span>
                            </label>
                            <?php } ?>
                        </div>
                    </div>
                </div>
                <div class="form-container selected-students">
                    <strong class="title">Alumnos seleccionados (<span class="total">0</span>)</strong>
                    <div class="content">
                        <div class="form-fields">
                            <div class="no-students-msg">
                                <span><span class="icon warning"></span> No hay alumnos seleccionados</span>
                            </div>
                            <!--<label class="no-quote">
                                <input value="" type="checkbox" name="students[]" checked readonly />
                                <img src="content/test-student-32x32.jpg" class="size-32x32" />
                                <span class="text">Laoreet dolore</span><button class="button important red">Deseleccionar</button>
                            </label>-->
                        </div>
                    </div>
                </div>
            </div>
            <?php } ?>
            <a class="button important blue" href="javascript:document.getElementById('lesson-create-form').submit();">Registrar clase personalizada</a>
            <a class="button" href="<?php echo $host .'lessons/'; ?>">Cancelar</a>
        </form>
    </div>
</div>